package lab02.Test25;

import java.util.Scanner;

public class ExceptionTest {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入被除数：");
        int b=scanner.nextInt();
        System.out.println("请输入除数：");
        int c=scanner.nextInt();
        try {
            System.out.println(b+"/"+c+"="+b/c);
        }catch (ArithmeticException e){
            System.out.println("除数为0！！！");
        }

    }
}
